/*************************************************************************
 * Copyright 2008 David Almilli
 *  
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 *  
 *     http://www.apache.org/licenses/LICENSE-2.0 
 *      
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 **************************************************************************/
package com.almilli.catnip.logging;

import org.apache.commons.logging.LogFactory;

public class CommonsLog implements Log {
    private org.apache.commons.logging.Log log;
    
    public CommonsLog(Class<?> cls) {
        log = LogFactory.getLog(cls);
    }
    
    public CommonsLog(String name) {
        log = LogFactory.getLog(name);
    }

    public void debug(Object msg) {
        log.debug(msg);
    }

    public void debug(Object msg, Throwable t) {
        log.debug(msg, t);
    }

    public void error(Object msg) {
        log.error(msg);
    }

    public void error(Object msg, Throwable t) {
        log.error(msg, t);
    }

    public void fatal(Object msg) {
        log.fatal(msg);
    }

    public void fatal(Object msg, Throwable t) {
        log.fatal(msg, t);
    }

    public void info(Object msg) {
        log.info(msg);
    }

    public void info(Object msg, Throwable t) {
        log.info(msg, t);
    }

    public void trace(Object msg) {
        log.trace(msg);
    }

    public void trace(Object msg, Throwable t) {
        log.trace(msg, t);
    }

    public void warn(Object msg) {
        log.warn(msg);
    }

    public void warn(Object msg, Throwable t) {
        log.warn(msg, t);
    }

    public boolean isDebugEnabled() {
        return log.isDebugEnabled();
    }

    public boolean isErrorEnabled() {
        return log.isErrorEnabled();
    }

    public boolean isFatalEnabled() {
        return log.isFatalEnabled();
    }

    public boolean isInfoEnabled() {
        return log.isInfoEnabled();
    }

    public boolean isTraceEnabled() {
        return log.isTraceEnabled();
    }

    public boolean isWarnEnabled() {
        return log.isWarnEnabled();
    }

}
